package com.example.treeHole.controller;

import com.example.treeHole.result.Result;
import com.example.treeHole.service.SensitiveWordsService;
import com.example.treeHole.vo.SensitiveWords;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/sensitive")
public class SensitiveWordsController {
    @Autowired
    private SensitiveWordsService sensitiveWordsService;

    @GetMapping("/findAll")
    public Result<List<SensitiveWords>> findAll(){
        List<SensitiveWords> list=sensitiveWordsService.findAll();
        return Result.success(list);
    }
}
